// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.DanglingIndices;

public partial class DanglingIndicesNamespacedClient : Elastic.Clients.Elasticsearch.NamespacedClientProxy
{
	/// <summary>
	/// <para>
	/// Initializes a new instance of the <see cref="Elastic.Clients.Elasticsearch.DanglingIndices.DanglingIndicesNamespacedClient"/> class for mocking.
	/// </para>
	/// </summary>
	protected DanglingIndicesNamespacedClient() : base()
	{
	}

	internal DanglingIndicesNamespacedClient(Elastic.Clients.Elasticsearch.ElasticsearchClient client) : base(client)
	{
	}

	public virtual Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse ListDanglingIndices(Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest request)
	{
		request.BeforeRequest();
		return DoRequest<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request);
	}

	public virtual Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse ListDanglingIndices()
	{
		var builder = new Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor();
		var request = builder.Instance;
		request.BeforeRequest();
		return DoRequest<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request);
	}

	public virtual Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse ListDanglingIndices(System.Action<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor> action)
	{
		var builder = new Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor();
		action.Invoke(builder);
		var request = builder.Instance;
		request.BeforeRequest();
		return DoRequest<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request);
	}

	public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse> ListDanglingIndicesAsync(Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest request, System.Threading.CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request, cancellationToken);
	}

	public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse> ListDanglingIndicesAsync(System.Threading.CancellationToken cancellationToken = default)
	{
		var builder = new Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor();
		var request = builder.Instance;
		request.BeforeRequest();
		return DoRequestAsync<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request, cancellationToken);
	}

	public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse> ListDanglingIndicesAsync(System.Action<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor> action, System.Threading.CancellationToken cancellationToken = default)
	{
		var builder = new Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestDescriptor();
		action.Invoke(builder);
		var request = builder.Instance;
		request.BeforeRequest();
		return DoRequestAsync<Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequest, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesResponse, Elastic.Clients.Elasticsearch.DanglingIndices.ListDanglingIndicesRequestParameters>(request, cancellationToken);
	}
}